<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page import="news.dao.impl.*" %>
<%@ page import="org.news.dao.*" %>
<%@ page import="news.entity.*" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <%-- <base href="<%=basePath%>"> --%>
    
    <title>My JSP 'doShowNews.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <!-- //对新增加的评论进行保存并重定向到showNews页面 -->
    
     <c:choose>
     <c:when test="${rows>0 }">
     <script type='text/javascript'>alert('评论成功！');location.href='showNews?nid=${comment.cnid}';</script>
     </c:when>
     <c:otherwise>
     <script type='text/javascript'>alert('评论失败！');location.href='showNews?nid=${comment.cnid}';</script>
     
     </c:otherwise>
     </c:choose>
     
     
     
  </body>
</html>
